<script>
    function MyScript () 
    {
        if (typeof jQuery === "undefined") {
            alert ("jQuery is undefined");
        } else {
            alert ($("head").text());
        }  
    }
    
    function LoadJQuery ( onload ) 
    {
        if (typeof jQuery !== "undefined") {
            if ( typeof onload !== 'undefined' ) script.onload = onload;
        } else {
            var script = document.createElement('script');
            if ( typeof onload !== 'undefined' ) script.onload = onload;
            script.src = "//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js";
            script.async = false;
            document.head.appendChild(script);
        }
    }

    LoadJQuery( function () { MyScript () });
</script>
